package com.lincoln.jenkins.test;

public enum EventEnum {
    JoinChatroom("JoinChatroom"),
    PushLoginUrl("PushLoginUrl"),
    ReceiveSysMsg("ReceiveSysMsg"),
    ReceiveVerifyMsg("ReceiveVerifyMsg"),
    ReceiveTransferMsg("ReceiveTransferMsg"),
    ReceiveQRPayMsg("ReceiveQRPayMsg"),
    ReceiveHBMsg("ReceiveHBMsg"),
    ReceiveMessage("ReceiveMessage");

    EventEnum(String type) {
        this.type = type;
    }

    private String type;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public static EventEnum findByType(String type) {
        for (EventEnum eventEnum : EventEnum.values()) {
            if (eventEnum.getType().equals(type)) {
                return eventEnum;
            }
        }
        return null;
    }
}
